本篇ShengYu 介紹Shell Script if 條件判斷式,常常在Shell Script 腳本裡會 ... 這邊舉個範例,Shell Script 用if 加上else 判斷兩個字串是否相同, ... ... <看更多>
Search
Search
本篇ShengYu 介紹Shell Script if 條件判斷式,常常在Shell Script 腳本裡會 ... 這邊舉個範例,Shell Script 用if 加上else 判斷兩個字串是否相同, ... ... <看更多>
IF - ELIF ... CONDITIONAL STATEMENTS (SIMPLE-IF , IF - ELSE , IF-ELIF-ELSE) IN SHELL SCRIPTING ... LINUX / UNIX COMMANDS & SHELL SCRIPTING ... ... <看更多>
Your script has the shebang #!/bin/sh and tries to use [[ , which is bash-specific syntax. You should either change the shebang: #!/bin/bash. ... <看更多>
or using bash syntax, em1=first em2=second for file in *; do if [[ $file == "$em1"[.-]* ]]; then ( cd Em1 && month_range ) elif [[ $file ... ... <看更多>